class AbstractConnection(object):
    """abstract interface for all Connection objects"""
    
    def create_command_stream(self, command):
        """return an iterable that sequences over (stdout, stderr)"""
        raise NotImplementedError
        
    def create_generator_stream(self, generator, virtualenv):
        """return an async iterable that sequences over (obj) and raises
        any remote exceptions as PickledExecutionExceptions"""
        raise NotImplementedError
    
    def open_file(self, filepath, mode = "w+"):
        """opens a stream to the given file on the connection"""
        raise NotImplementedError
    
    def remove_file(self, filepath):
        """removes a file on the given connection"""
        raise NotImplementedError
    
    def open_tempfile(self):
        """opens a temp file on the given connection"""
        raise NotImplementedError
    
    def make_directory(self, dirpath):
        """creates a directory on the given connection"""
        raise NotImplementedError
    
    def remove_directory(self, dirpath):
        """removes a directory on the given connection"""
        raise NotImplementedError

